//
// Created by A on 2024/7/2.
//

#ifndef GAME_CRASH_H
#define GAME_CRASH_H
extern "C"{

#include "stdio.h"
#include "stdint.h"
#include "Pinit.h"
#define Map_Offset 100  //地图加载外扩偏移
#define WIDTH 1248
#define HEIGHT 720

typedef struct {
    uint8_t Crash_pixel; //碰撞像素 八个bit分为9个等级
    uint8_t Attack_pixel; //攻击像素
}CRASHMap;

typedef struct {
    int x,y; //现在的位置，相对于地图原点的偏移
    CRASHMap CrashMap[WIDTH+Map_Offset*2][HEIGHT+Map_Offset*2]; //加载范围
}Crasg_str;


extern Crasg_str My_Crasg;








extern int Crash_load(Spirit_Rect Rect,int Crash_group_level);



extern int Crash_Contain(Spirit_Rect Rect);

};
#endif //GAME_CRASH_H
